package com.lipaluma.examples.annotation.custom;

import org.joda.time.DateTime;

import com.lipaluma.annotations.mapping.MapColumn;
import com.lipaluma.annotations.validations.ValidateInteger;

public class Invoice {

	@ValidateInteger(unique=true)
	@MapColumn(columnName="INVOICE_ID")
	private Long id;
	
	@MapColumn(columnName="CREATION_DATE")
	private DateTime creationDate;
	
	@MapColumn(columnName="AMOUNT_NET")
	private double amountNet;
	
	@MapColumn(with=ColumnAmountTTC.class)
	private double amountTTC;
	
	private Status status;
	
	public enum Status {
		STANDBY, PAID
	}

	public Long getId() {
		return id;
	}

	public DateTime getCreationDate() {
		return creationDate;
	}

	public double getAmountNet() {
		return amountNet;
	}

	public double getAmountTTC() {
		return amountTTC;
	}

	public Status getStatus() {
		return status;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setCreationDate(DateTime creationDate) {
		this.creationDate = creationDate;
	}

	public void setAmountNet(double amountNet) {
		this.amountNet = amountNet;
	}

	public void setAmountTTC(double amountTTC) {
		this.amountTTC = amountTTC;
	}

	public void setStatus(Status status) {
		this.status = status;
	}
	
	
}
